<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 选择下拉列表的颜⾊后，点击按钮删除选中的列表颜⾊ -->
    <form name="form1">
      <select id="colorSelect" name="sel">
        <option>Red</option>
        <option>Green</option>
        <option>White</option>
        <option>Black</option>
      </select>
      <button onclick="addopt()">点击删除</button>
    </form>
    <script>
      function addopt() {
        var obj = document.form1.sel
        //删除当前选中选项
        var index = obj.selectedIndex
        obj.remove(index)
      }
    </script>
  </body>
</html>
